<template>
	<div class="">

		<div class="zzc" v-if="showzzc" @click="close"></div>
		<div class="container">
			<div class="search_box" style="flex-wrap: wrap;">

				<el-select v-model="value2" placeholder="任务状态" @change="page=1">
					<el-option v-for="item in options2" :key="item.id" :label="item.name" :value="item.id">
					</el-option>
				</el-select>

				<div class="input-cont" style="margin-left:10px;width: 110px;margin-bottom: 20px;">
					<input type="text" class="form-control" readonly v-model="apname" placeholder="安排人">

					<img src="@assets/images/close.png" class="clears" alt="" v-if="apname"
						@click="apname = '';createId=''">
					<span class="iconfont icon-list" data-toggle="modal" data-target="#keshi"
						@click="utype='ap';openuseralert()"></span>
				</div>

				<div class="input-cont" style="margin-left:10px;width: 110px;margin-bottom: 20px;">
					<input type="text" class="form-control" readonly v-model="zxname" placeholder="执行人">

					<img src="@assets/images/close.png" class="clears" alt="" v-if="zxname"
						@click="zxname = '';completeId=''">
					<span class="iconfont icon-list" data-toggle="modal" data-target="#keshi"
						@click="utype='zx';openuseralert()"></span>
				</div>

				<div class="input-cont" style="margin-left:10px;width: 110px;margin-bottom: 20px;">
					<input type="text" class="form-control" readonly v-model="spname" placeholder="审批人">

					<img src="@assets/images/close.png" class="clears" alt="" v-if="spname"
						@click="spname = '';agreeIds=''">
					<span class="iconfont icon-list" data-toggle="modal" data-target="#keshi"
						@click="utype='sp';openuseralert()"></span>
				</div>

				<el-date-picker prefix-icon='none' style="margin-left: 10px;width: 150px;margin-bottom: 20px;"
					v-model="byDate" @change="changedate(1)" type="date" value-format="timestamp" placeholder="开始时间选择">
				</el-date-picker>
				<el-date-picker prefix-icon='none' style="margin-left: 10px;width: 150px;margin-bottom: 20px;"
					v-model="byDate2" @change="changedate(2)" type="date" value-format="timestamp" placeholder="结束时间选择">
				</el-date-picker>

				<el-select v-model="value4" placeholder="所属项目" @change="page=1">
					<el-option v-for="item in options4" :key="item.id" :label="item.xmName" :value="item.id">
					</el-option>
				</el-select>

				<div class="sea_btn sear_btns" style="margin-bottom: 20px;"
					@click="page=1;value2s=value2;value4s=value4;byDates=byDate;byDate2s=byDate2;createIds=createId;completeIds=completeId;agreeIdss=agreeIds;getlist()">
					<img src="@assets/images/search.png" alt="">
					查询
				</div>
				<div class="add_btn sear_btns rw" @click="openadd(value5)" v-if="$permissions.indexOf(169)  != -1">
					<img src="@assets/images/add.png" alt="">
					<div class="rwadd">任务</div>
					<el-select v-model="value5" placeholder="" class="btnsele" @change="openselect">
						<el-option class="rws" v-for="item in options5" :key="item.id" :label="item.template"
							:value="item.id">
						</el-option>
					</el-select>

				</div>
				<div style="margin-bottom: 20px;" class="del_btn sear_btns" @click="delopen"
					v-if="$permissions.indexOf(172)  != -1">
					<img src="@assets/images/del.png" alt="">
					批量删除
				</div>
			</div>
			<div class="table-responsive">
				<h2 class="tcent" v-if="list.length ==0">暂时没有数据</h2>
				<table class="table table-hover" v-else>
					<tr>
						<th style="width: 50px;">
							<input type="checkbox" @change="changeall" v-model="choseall" name="all" id="arw"><label
								for="arw"></label>
						</th>
						<th>任务名称</th>
						<!-- <th>任务描述</th> -->
						<th>所属项目</th>
						<th>安排人</th>
						<th>执行人</th>
						<th>审批人</th>
						<th>开始时间</th>
						<th>结束时间</th>
						<th>任务状态</th>
						<th class="tcent">操作</th>
					</tr>
					<tr v-for="item,index in list">
						<td style="width: 50px;">
							<input type="checkbox" v-model="item.chosesf" @change="chosechange" name="chose"
								:id="'rw'+item.id"><label :for="'rw'+item.id"></label>
						</td>
						<td>
							<span style="cursor: pointer;color:#4286f5"
								@click="id=item.id;showinfo=true">{{item.rwName}}</span>
							<img class="foucs" src="@assets/images/star.png" v-if="item.isAttention" alt=""
								@click="changeact(index)">
							<img class="foucs" src="@assets/images/emptystar.png" v-else alt=""
								@click="changeact(index)">
						</td>
						<!-- <td>{{item.rwDescripton}}</td> -->
						<td>{{item.xmName}}</td>
						<td>{{item.createName}}</td>
						<td>{{item.completeName}}</td>
						<td>
							<span style="color: #333;margin-right: 10px;"
								v-for="item2 in item.agreeUsers">{{item2.realName}}</span>
						</td>
						<td style="width: 160px;">{{item.beginDate}}</td>
						<td style="width: 160px;">{{item.finishDate}}</td>

						<td>{{item.stateName}}</td>
						<td class="tcent">
<!-- @click="id=item.id;getinfo();pager = 1;rightlist = [];getrightlist();showinfo=true;showzzc=true" -->
							<a href="javascript:;" class=" btn-blue btns"
								@click="id=item.id;showinfo=true">查看</a>
							<a href="javascript:;" class=" btn-green btns" @click="edit(index)"
								v-if="(typelist != 'finished' && item.stateId!='3') && $permissions.indexOf(171)  != -1">编辑</a>
							<a href="javascript:;" class="btn-org btns" @click="id=item.id;reopenalert=true"
								v-if="typelist == 'failRw' && $permissions.indexOf(171)  != -1">重启任务</a>

						</td>
					</tr>

				</table>

				<div class="page_box">
					<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
						:current-page="page" :page-sizes="[10, 30, 60, 100]" :page-size="limit"
						layout="total, sizes, prev, pager, next, jumper" :total="inglen">
					</el-pagination>
				</div>

			</div>


		</div>

		<!-- 重启 -->
		<div class="alzzc" v-if="reopenalert">
			<div class="del_alert" style="height: 260px;">
				<div class="modal-header tit" style="text-align: left;">
					<em></em>提示
					<div class="right" @click="id='';remark='';reopenalert=false">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"
							style="line-height: normal;"><span class="iconfont icon-cha" aria-hidden="true"></span>
						</button>
					</div>
				</div>
				<div class="alert_info" style="text-align: left;padding: 0 50px;">
					<div>此操作将重启任务，是否继续</div>
					<textarea name="" v-model="remark" placeholder="请输入备注"></textarea>
				</div>
				<div class="alert_btns">
					<div class="alert_sure" @click="reopen">确认</div>
					<div class="alert_close" @click="id='';remark='';reopenalert=false">取消</div>
				</div>
			</div>
		</div>
		<!--选择工程师弹窗-->
		<div :class="alert_enger?'modal in fade':'modal fade'" tabindex="-1" role="dialog" id="keshi"
			:style="alert_enger?'display: block;z-index:200;':'z-index:200;'">
			<div class="cent w600"
				style="justify-content: center;width: 712px !important;height: 70vh;margin-top: calc(15vh - 50px);">
				<div class="modal-dialog" role="document" style="width: 100%;">
					<div class="modal-content">
						<div class="modal-header tit">
							<em></em>工程师选择
							<div class="right" @click="alert_enger=false;engid=''">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"
									style="line-height: normal;"><span class="iconfont icon-cha"
										aria-hidden="true"></span> </button>
							</div>
						</div>
						<!--表单-->
						<div class="modal-body h100 search-cont" style="padding: 15px 27px;height: calc(70vh - 138px);">
							<div class="chosed">已选择：{{enrname}}</div>
							<div class="al_box" v-for="item in enrlist">
								<div class="enr_title">{{item.name}}</div>
								<div class="enr_list">
									<div class="enr_li" v-for="item2 in item.children">
										<input type="radio" name="choses" @change="choseeng(item2)" :value="item2.id"
											v-model="engid" :id="item2.realName+item2.id"><label
											:for="item2.realName+item2.id"></label>
										<label :for="item2.realName+item2.id"
											style="margin-bottom: 0;">{{item2.realName}}</label>
									</div>
								</div>
							</div>
						</div>
						<div class="modal-footer tcent">
							<button class="btn btn-primary" @click="sure_eng">确定</button>
							<button class="btn btn-info close_eng" @click="alert_enger=false;engid=''">关闭</button>
						</div>
					</div>
				</div>
			</div>
		</div>

		<!--新增任务-->
		<div :class="showadd?'modal in fade':'modal fade'" tabindex="-1" role="dialog" id="keshi"
			:style="showadd?'display: block;z-index:200;':'z-index:200;'">
			<div class="cent w600" style="justify-content: center;width: 860px !important;">
				<div class="modal-dialog" role="document" style="width: 100%;height: 680px;">
					<div class="modal-content">
						<div class="modal-header tit">
							<em></em>{{info.id?'编辑任务':'新建任务'}}
							<div class="right" @click="showadd=false;">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"
									style="line-height: normal;"><span class="iconfont icon-cha"
										aria-hidden="true"></span> </button>
							</div>
						</div>
						<!--表单-->
						<div class="modal-body h100 search-cont" style="padding: 15px 27px;height: 558px;">
							<div class="sublist">
								<div class="subli">
									<div class="subli_left">
										<label class="subl"><em class="red">*</em>项目名称</label>
										<el-select v-model="info.xmId" placeholder="项目名称" @change="changenew">
											<el-option v-for="item in options6" :key="item.id" :label="item.xmName"
												:value="item.id">
											</el-option>
										</el-select>
									</div>
									<div class="subli_left">
										<label class="subl">阶段</label>
										<el-select v-model="info.stageName" placeholder="阶段" @change="$forceUpdate()">
											<el-option v-for="item in options7" :key="item.xmStageName"
												v-if="item.id != 0" :label="item.xmStageName" :value="item.xmStageName">
											</el-option>
										</el-select>
									</div>
								</div>
								<div class="subli">
									<div class="subli_left">
										<label class="subl"><em class="red">*</em>任务名称</label>
										<div class="input-cont">
											<input type="text" class="form-control" v-model="info.rwName"
												placeholder="输入任务名称">
										</div>
									</div>
								</div>
								<div class="subli">
									<div class="subli_left">
										<label class="subl"><em class="red">*</em>开始时间</label>
										<div class="input-cont">
											<el-date-picker v-model="info.beginDate" type="datetime"
												@change="changedate(1)" value-format="timestamp" placeholder="开始时间">
											</el-date-picker>
										</div>
									</div>
									<div class="subli_left">
										<label class="subl"><em class="red">*</em>结束时间</label>
										<div class="input-cont">
											<el-date-picker v-model="info.finishDate" type="datetime"
												@change="changedate(2)" value-format="timestamp" placeholder="结束时间">
											</el-date-picker>
										</div>
									</div>
								</div>
								<div class="subli">
									<div class="subli_left">
										<label class="subl"><em class="red">*</em>安排人</label>
										<div class="input-cont">
											<input type="text" class="form-control" v-model="createName" readonly
												placeholder="输入任务名称">
											<!-- <el-autocomplete popper-class="my-autocomplete" :trigger-on-focus="false"
												v-model="createName" value-key="realName"
												:fetch-suggestions="querySearch_u" placeholder="请选择安排人"
												@select="handleSelect_u">
												<template slot-scope="{ item }">
													<div class="tab_tr">
														<div class="tab_td">{{ item.userName }}</div>
														<div class="tab_td">{{ item.realName }}</div>
														<div class="tab_td">{{ item.departName }}</div>
														<div class="tab_td">{{ item.phoneNo }}</div>
													</div>

												</template>
											</el-autocomplete>
											<span class="iconfont icon-list"
												@click="utype='addap';openuseralert()"></span> -->
										</div>
									</div>
									<div class="subli_left">
										<label class="subl"><em class="red">*</em>审批人</label>
										<div class="input-cont">
											<input type="text" class="form-control" v-model="cnames" readonly
												placeholder="请选择审批人">
											<span class="iconfont icon-list"
												@click="utype='addsp';openuseralert2()"></span>
										</div>
									</div>
								</div>

								<div class="subli">
									<div class="subli_left">
										<label class="subl"><em class="red">*</em>执行人</label>
										<div class="input-cont">
											<el-autocomplete popper-class="my-autocomplete" :trigger-on-focus="false"
												v-model="completeName" value-key="realName"
												:fetch-suggestions="querySearch_u" placeholder="请选择执行人"
												@select="handleSelect_u2">
												<template slot-scope="{ item }">
													<div class="tab_tr">
														<div class="tab_td">{{ item.userName }}</div>
														<div class="tab_td">{{ item.realName }}</div>
														<div class="tab_td">{{ item.departName }}</div>
														<div class="tab_td">{{ item.phoneNo }}</div>
													</div>

												</template>
											</el-autocomplete>
											<span class="iconfont icon-list"
												@click="utype='addzx';openuseralert()"></span>
										</div>
									</div>
									<div class="subli_left">
										<label class="subl">抄送人</label>
										<div class="input-cont">
											<input type="text" class="form-control" v-model="cnames2" readonly
												placeholder="请选择抄送人">
											<span class="iconfont icon-list"
												@click="utype='addcs';openuseralert2()"></span>
										</div>
									</div>
								</div>

								<div class="subli">
									<div class="sublia">
										<label class="subl">任务描述</label>
										<div class="input-cont">
											<textarea name="" v-model="info.rwDescripton" id=""
												placeholder="请输入任务描述"></textarea>
										</div>
									</div>
								</div>
								<div class="subli">
									<div class="subli">
										<div class="subli_left" style="width:100%">
											<label class="subl"><em class="red">*</em>优先级：</label>
											<div class="radio" style="margin-bottom: 0;">
												<el-radio-group v-model="info.emergencyId">
													<el-radio :label="1">常规处理</el-radio>
													<el-radio :label="2">较紧急</el-radio>
													<el-radio :label="3">非常紧急</el-radio>
												</el-radio-group>
											</div>
										</div>
									</div>
								</div>
								<div class="subli">
									<div class="subli_left">
										<label class="subl">评分</label>
										<div class="input-cont">
											<input type="text" class="form-control" v-model="info.score"
												placeholder="输入评分">
										</div>
									</div>
									<div class="subli_left">
										<label class="subl">工作时长</label>
										<div class="input-cont">
											<input type="text" class="form-control" v-model="info.workTime"
												placeholder="输入工作时长（单位小时）">
										</div>
									</div>
								</div>

								<div class="subli" style="align-items: flex-start;">
									<label class="subl">附件上传</label>
									<div class="check_li_r">
										<el-upload class="upload-demo" ref="upload" 
											:headers="{'Authorization':token}" :action="$url+'/file/upload'"
											:show-file-list="false" :file-list="fileList3" :before-upload="beforeUpload"
											:on-success="uploadsuc3" :multiple="true" :auto-upload="true">
											<div class="upload_btn">
												<img src="@/assets/images/upload.png" alt="">点击上传
											</div>
										</el-upload>
										<div class="upload_list">
											<div class="up_li" v-for="item,index in files3">
												<div class="file_name">
													<div class="file_name_left"><img src="@/assets/images/upload.png"
															alt="">{{item.name}}
													</div>
													<div class="file_name_right">
														<div class="file_check"
															@click="check_file($url + item.relativePath)">查看
														</div>
														<div class="file_del" @click="del_file3(index)">
															删除
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>


							</div>
						</div>
						<div class="modal-footer tcent">
							<button class="btn btn-primary" @click="showData">确定</button>
							<button class="btn btn-info close_eng" @click="showadd=false">关闭</button>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="alzzc" v-if="delalert">
			<div class="del_alert">
				<div class="modal-header tit" style="text-align: left;">
					<em></em>信息
					<div class="right" @click="delalert=false">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"
							style="line-height: normal;"><span class="iconfont icon-cha" aria-hidden="true"></span>
						</button>
					</div>
				</div>
				<div class="alert_info">确认要删除选中的<span>{{delnum}}</span>条数据吗？</div>
				<div class="alert_btns">
					<div class="alert_sure" @click="del">确认</div>
					<div class="alert_close" @click="delalert=false">取消</div>
				</div>
			</div>
		</div>
		<rwinfo :id="id" :showinfo="showinfo" @show="show(e)"></rwinfo>
		<!--报修人-->
		<div :class="user_alert?'modal in fade':'modal fade'" role="dialog"
			:style="user_alert?' align-items: center;justify-content: center;display: flex;z-index:200;':'z-index:200'"
			id="engineer">

			<div class="cent w700" style="height: 865px;max-width: 955px;max-height:calc(100vh - 50px)">

				<div class="modal-dialog" role="document">
					<div class="modal-content" style="overflow: visible;">
						<div class="modal-header tit">
							<em></em>选择用户
							<div class="right" @click="closeusertalert">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
										class="iconfont icon-cha" aria-hidden="true"></span> </button>
							</div>
						</div>
						<!--表单-->
						<div class="modal-body h100"
							style="overflow-x: hidden;overflow-y:scroll;height:760px;max-height:calc(100vh - 150px)">

							<div class="left">
								<div class="zTreeDemoBackground">
									<ul id="treeDemo4" class="ztree" @select="choseroom_user"></ul>
								</div>
							</div>
							<div class="right" style="overflow: visible;">
								<div class="search">
									<!-- <form> -->
									<div class="form-group" style="display: flex;padding-right: 0;">
										<input class="form-control" autocomplete="off"
											@keydown.enter="page2=1;word_users=word_user;getalluserlist()"
											v-model="word_user" placeholder="输入关键字">
										<div style="margin-left: 10px;" class="btn btn-success"
											@click="page2=1;word_users=word_user;getalluserlist()">
											<span class="iconfont icon-chaxun"
												style="line-height: 34px;vertical-align: baseline;"></span>
										</div>
									</div>
									<!-- </form> -->
								</div>

								<div class="enr_alert_scorll">
									<div style="height: 552px;overflow-y: auto;">
										<h2 class="tcent" v-if="user_all.length ==0">暂时没有数据</h2>
										<table class="table table-hover smallTab" v-else>
											<tr>
												<th></th>
												<th>账号</th>
												<th>姓名</th>
												<th>电话</th>
											</tr>
											<tr v-for="item,index in user_all">
												<td>
													<input type="radio" v-model="userid" :value="item.id"
														@change="changechose(item.id,item.realName,item.phoneNo)"
														name="chose2" :id="'c'+item.id"><label
														:for="'c'+item.id"></label>
												</td>
												<td>{{item.userName}}</td>
												<td>{{item.realName}}</td>
												<td>{{item.phoneNo}}</td>
											</tr>
										</table>
									</div>
									<div class="Spage" style="margin: 20px 0;">
										<el-pagination @current-change="handleCurrentChange2" :current-page="page2"
											style="display: flex;justify-content: center;" :pager-count="5"
											:page-size="10" :page-count="num2" layout="prev, pager, next">
										</el-pagination>
									</div>


									<div class="tcent" style="margin-bottom: 30px;">
										<button class="btn btn-primary" @click="sure_user">确定</button>&emsp;
										<button class="btn btn-default" @click="closeusertalert">关闭</button>
									</div>
								</div>


							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--选择添加工程师-->
		<div :class="alert_show?'modal in fade':'modal fade'" role="dialog"
			:style="alert_show?' align-items: center;justify-content: center;display: flex;z-index:200':''"
			id="engineer">

			<div class="cent w700" style="height: 865px;max-width: 955px;max-height:calc(100vh - 50px)">

				<div class="modal-dialog" role="document">
					<div class="modal-content" style="overflow: visible;">

						<div class="modal-header tit">
							<em></em>选择用户
							<div class="right" @click="closealert">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
										class="iconfont icon-cha" aria-hidden="true"></span> </button>
							</div>
						</div>
						<!--表单-->
						<div class="modal-body h100" style="height:760px;max-height:calc(100vh - 150px)">
							<div class="left">
								<div class="zTreeDemoBackground">
									<ul id="treeDemo2" class="ztree" @select="choseroom_user"></ul>
								</div>
							</div>
							<div class="right" style="overflow: visible;">
								<div class="search">
									<!-- <form> -->
									<div class="form-group" style="display: flex;padding-right: 0;">
										<input class="form-control" autocomplete="off"
											@keydown.enter="page2=1;word_users=word_user;getalluserlist()"
											v-model="word_user" placeholder="输入关键字">
										<div style="margin-left: 10px;" class="btn btn-success"
											@click="page2=1;word_users=word_user;getalluserlist()">
											<span class="iconfont icon-chaxun"
												style="line-height: 34px;vertical-align: baseline;"></span>
										</div>
									</div>
									<!-- </form> -->
								</div>
								<div class="txt-black">为您找到{{inglen2}}位 <span class="txt-blue">用户</span> </div>

								<div class="enr_alert_scorll">
									<div style="height: 552px;overflow-y: auto;">
										<h2 class="tcent" v-if="cuserlist.length ==0">暂时没有数据</h2>
										<table class="table table-hover smallTab" v-else>
											<tr>
												<th><input type="checkbox" @change="changeall2" v-model="choseall2"
														name="allt" id="tuser"><label for="tuser"></label></th>
												<th>账号</th>
												<th>姓名</th>
												<th>电话</th>
											</tr>
											<tr v-for="item,index in cuserlist">
												<td>
													<input type="checkbox" v-model="item.chosesf" @change="chosechange2"
														name="chose2" :id="'tuser'+item.id"><label
														:for="'tuser'+item.id"></label>
												</td>
												<td>{{item.userName }}</td>
												<td>{{item.realName}}</td>
												<td>{{item.phoneNo}}</td>
											</tr>
										</table>
									</div>
									<div class="Spage" style="margin: 20px 0;">
										<el-pagination @current-change="handleCurrentChange2" :current-page="page2"
											style="display: flex;justify-content: center;" :pager-count="5"
											:page-size="10" layout="prev, pager, next" :total="inglen2">
										</el-pagination>
									</div>

									<div class="tcent" style="margin-bottom: 30px;">
										<button class="btn btn-primary" @click="cusers">确定</button>&emsp;
										<button class="btn btn-default" @click="closealert()">关闭</button>
									</div>
								</div>


							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<div class="loading-content" v-if="showloading">
			<div class="loading-spinner">
				<svg viewBox="25 25 50 50" class="circular">
					<circle cx="50" cy="50" r="20" fill="none" class="path"></circle>
				</svg>
			</div>
			<div class="loading-text">加载中...</div>
		</div>
	</div>
</template>

<script type="text/babel">
	import $ from 'jquery'
import rwinfo from './taskinfo.vue'
	export default {
		name: "",
		props: {
			typelist:{
				type:String,
				default:''
			},
			rwinfoid:{
				type:String,
				default:''
			},
		},
		data() {
			return {
				reopenalert:false,
				mbid:'',
				msgremark: '',
				remark: '',
				check: 0,
				rightlist: [],
				options2: [],
				options4: [],
				options5: [],
				options6: [],
				options7: [],
				fileList2: [],
				enrlist: [],
				engid:"",
				enrname:"",
				value2:"",
				value2s:"",
				value3:"",
				value4:"",
				value5:"",
				value4s:"",
				userid:"",
				isPass:"",
			
				word2:"",
				naes:"",
				byDate:"",
				byDate2:"",
				byDates:"",
				byDate2s:"",
				apname:"",
				zxname:"",
				spname:"",
				word_user:"",
				word_users:"",
				createId:"",
				createIds:"",
				completeId:"",
				completeIds:"",
				spshow:false,
				passalert:false,
				failalert:false,
				doalert:false,
				options_show2:false,
				choseall:false,
				utype:"",
				alert_enger: false,
				showadd: false,
				menushow: false,
				showzzc: false,
				cuserlist: [],
				zNodes_u: [],
				ztree_obj_u: {},
				treeClickCount4: 0,
				setting_u: {
					treeId: 'id',
					data: {
						key: {
							name: 'name'
						}
					},
					callback: {
						onClick: this.choseroom_user
					}
				},
				page: 1,
				page2: 1,
				pager: 1,
				list: [],
				inglen: 0,
				inglen2: 0,
				limit: 10,
				limitr: 10,
				limit2: 10,
				num: 1,
				num2: 1,
				info: {emergencyId:1},
				showinfo: false,
				showloading: false,
				user_alert: false,
				alert_show: false,
				user_all:[],
				user_c:[],
				user_c2:[],
				cname:[],
				cname2:[],
				cnames:"",
				cnames2:"",
				createName:"",
				toId:"",
				completeName:"",
				delnum:'',
				delalert:false,
				fileList3:[],
				files3id:[],
				files2id:[],
				files3:[],
				files2:[],
				uid: sessionStorage.getItem('uid'),
				realName: sessionStorage.getItem('realName')
			}
		},
		components: {rwinfo},
		created() {
			this.$http.defaults.headers["Authorization"] = sessionStorage.getItem('token')
			this.token = sessionStorage.getItem('token')
		},
		mounted() {
			this.gettype();
			this.getmb();
			this.getproject();
			// this.getenrlist();
			this.getlist();
			
		},
		watch:{
			rwinfoid:{
				handler(newValue,oldValue){
					
					console.log(newValue)
					// if(newValue){
						this.id = newValue
						this.getinfo()
						
					// }else{
						
					// }
				},
				deep: true
			},
		},
		beforeRouteEnter(to, from, next) { //路由导航钩子，通过页面路由标记是否需要清空页面数据重新加载
		    to.meta['fromPath'] = from.path;
			to.meta['needFresh'] = false;
		    
		    next();
		  },
		activated(){
			
		},
		methods: {
			show(e){
				console.log(e)
				this.showinfo = e
				this.getlist()
			},
			reopen(){
				var that = this
				var param = {
					rwId:this.id,
					remark:this.remark,
				}
				this.$http.post(this.$url + '/rw/restartRw', this.$qs.stringify(param))
					.then(function(response) {
						that.$Toast(response.data.msg);
						that.reopenalert=false;
						that.remark='';
						that.id='';
						that.getlist()
					})
					.catch(function(error) {
						console.log(error);
						
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			changenew(e){
				this.info.stageName ='';
				this.changexm(e)
			},
			changexm(e){
				
				console.log(e)
				this.showloading = true
				var param ={
						id:e
					}
				var that = this
				this.$http.post(this.$url + '/xm/stage/select', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.options7 = response.data.data
						that.showloading = false
					})
					.catch(function(error) {
						console.log(error);
						// sessionStorage.setItem('token','undefined')
						// that.$router.push('/login')
						
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			openselect(e){
				// console.log(e)
				
				// if(!e){
					this.openadd(this.value5)
				// }
			},
			changedate(ty,t){
				// console.log(this.info.beginDate)
				if(this.info.beginDate && this.info.finishDate&& this.info.beginDate > this.info.finishDate){
					this.$Toast('选择的结束日期在开始日期之前');
					if(ty==1){
						this.info.beginDate = ''
					}else{
						this.info.finishDate = ''
					}
					return
				}
				if(t == 'check'){
					this.showData('check')
				}
				
				if(this.byDate && this.byDate2 && this.byDate > this.byDate2){
					this.$Toast('选择的结束日期在开始日期之前');
					if(ty==1){
						this.byDate = ''
					}else{
						this.byDate2 = ''
					}
					return
				}
			},
			
			choseeng(item2){
				this.enrname=item2.realName;
				this.engid= item2.id
				
			},
			
			sure_eng(){
				
				var that = this
				var param = {
					rwId:this.id,
					fromId: sessionStorage.getItem('uid'),
					toId:this.engid,
				}
				this.$http.post(this.$url + '/rw/assign', this.$qs.stringify(param))
					.then(function(response) {
						that.$Toast(response.data.msg);
						that.alert_enger=false;
						that.showinfo=false;
						that.menushow=false;
						that.engid=''
						that.enrname=''
						that.getlist()
					})
					.catch(function(error) {
						console.log(error);
						
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			getenrlist() {
				var that = this
				
				this.$http.post(this.$url + '/group/listAll')
						.then(function(response) {
							if (response.data.code == '1410') {
								that.$Toast(response.data.msg);
								sessionStorage.setItem('token', '')
								that.$router.push('/login')
								return
							}
							that.enrlist = response.data.data
							that.zNodes_eng = response.data.data
							that.ztree_obj_eng = $.fn.zTree.init($("#treeDemo5"), that.setting_eng, that.zNodes_eng);
							var  nodes4 = that.ztree_obj_eng.getNodes();
							for  ( var  i = 0; i < nodes4.length; i++) {  //设置节点展开
							    that.ztree_obj_eng.expandNode(nodes4[i],  true ,  false ,  true );
							}
						})
						.catch(function(error) {
							sessionStorage.setItem('token','undefined')
							that.$router.push('/login')
						});
			
			},
			del_file3(i){
				var that = this
				var param = {fileId:this.files3id[i]}
				this.$http.post(this.$url + '/main/delete/file', this.$qs.stringify(param))
					.then(function(response) {
						console.log(response)
							that.files3.splice(i,1)
							that.files3id.splice(i,1)
						that.fileList3.splice(i,1)
						if(that.check == 1){
							that.showData('check')
						}
					})
					.catch(function(error) {
						console.log(error);
						
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			check_file(url){
					   window.open(url, '_blank');
			},
			uploadsuc3(file, fileList){
				
				if(file.code != 0){
					this.$Toast(file.msg)
					this.showloading=false
					return
				}
				 this.files3.push({relativePath:file.data.relativePath,name:file.data.name})
				 this.files3id.push(file.data.id)
				 this.showloading=false
				 if(this.check == 1){
				 	this.showData('check')
				 }
			},
			
			beforeUpload(e){
				this.showloading=true
				const fd = new FormData();
				 fd.append("file", e);
				 fd.append("project", 'rw');
				 fd.append("secret", this.$md5(e.name + 'gd' + e.size));
				
				var that = this
				this.$http.post(this.$url + '/file/upload', fd, {
						headers: {
							'Content-Type': 'multipart/form-data; boundary=something'
						}
					})
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						// that.files3.push(response.data.data.relativePath)
						// that.files3.push({relativePath:response.data.data.relativePath,name:response.data.data.name})
						// that.files3id.push(response.data.data.id)
						if(response.data.code != 0){
							that.$Toast(response.data.msg)
							that.showloading=false
							return
						}
						 that.files3.push({relativePath:response.data.data.relativePath,name:response.data.data.name})
						 that.files3id.push(response.data.data.id)
						 that.showloading=false
						 if(that.check == 1){
						 	that.showData('check')
						 }
					})
					.catch(function(error) {
						console.log(error);
					});
					
				return false
			},
			handleCurrentChange2(val) {
			  console.log(`当前页: ${val}`);
								this.page2 = val
								this.getalluserlist()
			},
			openuseralert2(){
				console.log(this.user_c)
				console.log(this.user_c2)
				this.getrooms()
				this.page2 = 1
				this.getalluserlist()
				this.alert_show = true
				this.$forceUpdate()
			},
			chosechange2(){
				var a = 0
				for (var i = 0; i < this.cuserlist.length; i++) {
					if(this.cuserlist[i].chosesf == true){
						a++
						if(this.utype == 'addsp'){
							this.user_c.push(this.cuserlist[i].id)
							this.cname.push(this.cuserlist[i].realName)
							this.user_c = this.user_c.filter((item, index, array) => {
							  return array.indexOf(item) === index
							})
							this.cname = this.cname.filter((item, index, array) => {
							  return array.indexOf(item) === index
							})
						}else if(this.utype == 'addcs'){
							this.user_c2.push(this.cuserlist[i].id)
							this.cname2.push(this.cuserlist[i].realName)
							this.user_c2 = this.user_c2.filter((item, index, array) => {
							  return array.indexOf(item) === index
							})
							this.cname2 = this.cname2.filter((item, index, array) => {
							  return array.indexOf(item) === index
							})
						}
						
					}else{
						if(this.utype == 'addsp'){
							if(this.cname.indexOf(this.cuserlist[i].realName) > -1){
								this.cname.splice(this.cname.indexOf(this.cuserlist[i].realName),1)
							}
							if(this.user_c.indexOf(this.cuserlist[i].id) > -1){
								this.user_c.splice(this.user_c.indexOf(this.cuserlist[i].id),1)
							}
						}else if(this.utype == 'addcs'){
							if(this.cname2.indexOf(this.cuserlist[i].realName) > -1){
								this.cname2.splice(this.cname2.indexOf(this.cuserlist[i].realName),1)
							}
							if(this.user_c2.indexOf(this.cuserlist[i].id) > -1){
								this.user_c2.splice(this.user_c2.indexOf(this.cuserlist[i].id),1)
							}
						}
					}
					
				}
				console.log(this.user_c)
				console.log(this.user_c2)
				if(a == this.cuserlist.length){
					this.choseall2=true
				}else{
					this.choseall2=false
				}
				this.$forceUpdate()
				// if(this.check == 1){
				// 	this.showData('check')
				// }
			},
			changeall2(){
				console.log(this.utype)
				if(this.choseall2){
					for (var i = 0; i < this.cuserlist.length; i++) {
						this.cuserlist[i].chosesf = true
						if(this.utype == 'addsp'){
							this.user_c.push(this.cuserlist[i].id)
							this.cname.push(this.cuserlist[i].realName)
							console.log(this.cname)
							this.user_c = this.user_c.filter((item, index, array) => {
							  return array.indexOf(item) === index
							})
							this.cname = this.cname.filter((item, index, array) => {
							  return array.indexOf(item) === index
							})
						}else if(this.utype == 'addcs'){
							this.user_c2.push(this.cuserlist[i].id)
							this.cname2.push(this.cuserlist[i].realName)
							this.user_c2 = this.user_c2.filter((item, index, array) => {
							  return array.indexOf(item) === index
							})
							this.cname2 = this.cname2.filter((item, index, array) => {
							  return array.indexOf(item) === index
							})
						}
					}
				}else{
					
						for (var i = 0; i < this.cuserlist.length; i++) {
							this.cuserlist[i].chosesf = false
							if(this.utype == 'addsp'){
								this.user_c.splice(this.user_c.indexOf(this.cuserlist[i].id),1)
								this.cname.splice(this.cname.indexOf(this.cuserlist[i].realName),1)
							}else if(this.utype == 'addcs'){
									this.user_c2.splice(this.user_c2.indexOf(this.cuserlist[i].id),1)
									this.cname2.splice(this.cname2.indexOf(this.cuserlist[i].realName),1)
							}
						}
					}
					if(this.check == 1){
						this.showData('check')
					}
					this.$forceUpdate()
			},
			
			closealert(){
				
				this.choseall2=false
				this.alert_show=false;
				// this.user_c = []
				// this.cname = []
				// this.cname2 = []
				if(this.utype == 'addsp'){
					this.cnames = this.cname.join(',')
				}else if(this.utype == 'addcs'){
					this.cnames2 = this.cname2.join(',')
				}
				this.word_user = ''
				this.word_users = ''
				this.deptId = ''
				this.did = ''
				this.getrooms()
				this.ztree_obj_u.cancelSelectedNode();
				this.getalluserlist()
			},
			
			cusers(){
				
				if(this.utype == 'addsp'){
					this.cnames = this.cname.join(',')
				}else if(this.utype == 'addcs'){
					this.cnames2 = this.cname2.join(',')
				}
				this.alert_show=false
				this.word_user = ''
				this.word_users = ''
				this.deptId = ''
				this.getrooms()
				this.did = ''
				this.ztree_obj_u.cancelSelectedNode();
				this.getalluserlist()
			},
			
			delopen(id){
				var ids=''
				var num = 0
				if(id>0){
					num = 1
					this.ids = id
				}else{
					for (var i = 0; i < this.list.length; i++) {
						if(this.list[i].chosesf==true){
							ids = ids+''+this.list[i].id+','
							// this.ids.push(this.list[i].id)
							num++
						}
					}
					this.ids = ids.substring(0,ids.length-1)
					if(this.ids==''){
						this.$Toast('暂无选中');
						return
					}
				}
				
				this.delnum = num
				this.delalert=true		
			},
			// 删除
			del(){
				this.delalert=false
				var param = {
					list:this.ids
				}
				var that = this
				this.$http.post(this.$url + '/rw/delete', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.$Toast(response.data.msg);
						that.page=1
						that.showinfo = false
						that.menushow = false
						that.choseall = false
					that.getlist()
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			changeall(){
				if(this.choseall){
					for (var i = 0; i < this.list.length; i++) {
						this.list[i].chosesf = true
					}
				}else{
					for (var i = 0; i < this.list.length; i++) {
						this.list[i].chosesf = false
					}
				}
			},
			chosechange(){
				for (var i = 0; i < this.list.length; i++) {
					if(this.list[i].chosesf == true){
						this.choseall=true
					}else{
						this.choseall=false
						break
					}
					
				}
			},
			changeact(i){
				this.showloading = true
				var param = {
					id:this.list[i].id,
					userId: sessionStorage.getItem('uid')
				}
				var part = ''
				if(this.list[i].isAttention == 0){
					part = '/rw/addAttention'
				}else{
					part = '/rw/deleteAttention'
				}
				var that = this
				this.$http.post(this.$url + part, this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.$Toast(response.data.msg)
						that.getlist()
						that.showloading = false
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			changechose(id,name,tel){
				if(this.utype == 'ap'){
					this.apname = name
					this.createId = id
				}else if(this.utype == 'zx'){
					this.zxname = name
					this.completeId = id
				}else if(this.utype == 'sp'){
					this.spname = name
					this.agreeIds = id
				}else if(this.utype == 'addap'){
					this.createName = name
					this.info.createId = id
				}else if(this.utype == 'addzx'){
					this.completeName = name
					this.info.completeId = id
				}else if(this.utype == 'zj'){
					this.engid = id
				}
			},
			sure_user(){
				
				this.user_alert = false
				if(this.utype == 'zj'){
					this.sure_eng()
				}
				if(this.check == 1){
					this.showData('check')
				}
			},
			closeusertalert(){
				this.user_alert = false
				this.username = ''
				this.principalId = ''
				this.word_user = ''
				this.did = ''
				this.userid = ''
				this.uphone = ''
				this.ztree_obj_u.cancelSelectedNode();
				this.getrooms()
				this.getalluserlist()
			},
			openuseralert(e){
				this.page2 = 1
				this.username = ''
				this.principalId = ''
				this.word_user = ''
				this.did = ''
				this.userid = ''
				this.uphone = ''
				
				this.getrooms()
				this.getalluserlist()
				this.user_alert = true
			},
			// 模板
			getmb() {
				var that = this
				this.$http.get(this.$url + '/rw/template/select')
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.options5 = response.data.data
						for (var i = 0; i < that.options5.length; i++) {
							if(that.options5[i].isDefault == 1){
								that.value5 = that.options5[i].id
								that.mbid = that.options5[i].id
								console.log(that.mbid)
							}
						}
						
					})
					.catch(function(error) {
					});
			},
			// 全部项目名称
			getproject() {
				var that = this
				this.$http.get(this.$url + '/xm/selectAll')
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.options4 = response.data.data
						that.options4.unshift({'xmName':'全部项目',id:''})
						
						that.options6 = response.data.data
						console.log(that.options6[0].xmName)
						if(that.options6[0].xmName == '全部项目'){
							that.options6 = that.options6.slice(1)
						}
					})
					.catch(function(error) {
					});
			},
			
			// 获取查询项目状态
			gettype() {
				var that = this
				this.$http.get(this.$url + '/rw/getRwState')
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.options2 = response.data.data
						that.options2.unshift({'name':'全部状态',id:''})
					})
					.catch(function(error) {
					});
			},
			// 获取弹窗里的用户
			getalluserlist() {
				this.choseall2 = false
				var id = this.did?this.did:''
				var that = this
				var url = encodeURI(this.$url + '/sys/user/list?page='+this.page2+'&limit='+this.limit2+'&deptId='+id+'&userName='+this.word_users)
				this.$http.get(url)
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.user_all = response.data.data.records
						that.cuserlist = response.data.data.records
						for (var i = 0; i < that.user_all.length; i++) {
							that.user_all[i].id = window.atob(that.user_all[i].id)
							that.cuserlist[i].id = that.user_all[i].id
						}
						console.log(that.user_c)
						console.log(that.user_c2)
						if(that.utype == 'addsp'){
							var a = 0
							console.log(that.user_c)
							for (var i = 0; i < that.cuserlist.length; i++) {
								
								
								if(that.user_c.indexOf(that.cuserlist[i].id) > -1){
									a++
									that.cuserlist[i].chosesf = true
								}else{
									that.cuserlist[i].chosesf = false
								}
							}
							
						}else if(that.utype == 'addcs'){
							var a = 0
							console.log(that.user_c2)
							for (var i = 0; i < that.cuserlist.length; i++) {
								if(that.user_c2.indexOf(that.cuserlist[i].id) > -1){
									a++
									that.cuserlist[i].chosesf = true
								}else{
									that.cuserlist[i].chosesf = false
								}
							}
						}
						if(a == that.cuserlist.length){
							that.choseall2=true
						}else{
							that.choseall2=false
						}
						that.inglen2 = response.data.data.total
						if (that.inglen2 > that.limit2) {
							that.num2 = response.data.data.pages
						} else {
							that.num2 = 1
						}
					})
					.catch(function(error) {
						console.log(error);
						// sessionStorage.setItem('token','undefined')
						// that.$router.push('/login')
					});
			},
			// 科室树状图选择
			choseroom_user(data, node, treeNode) {
				this.treeClickCount4++;
				if (this.treeClickCount4 >= 2) {
					return;
				}
				this.timer = window.setTimeout(() => {
					if (this.treeClickCount4 == 1) {
						this.treeClickCount4 = 0;
						console.log('单击事件,可在此处理对应逻辑')
							
								this.did = treeNode.id
							this.page2=1
							this.getalluserlist()
						
					} else if (this.treeClickCount4 > 1) {
						this.treeClickCount4 = 0;
						
						this.ztree_obj_u.cancelSelectedNode();
						console.log('双击事件,可在此处理对应逻辑')
					}
				}, 300);
			},
			// 获取科室
			getrooms() {
				var param = {
					parentId: 0
				}
				var that = this
				this.$http.post(this.$url + '/sys/dept/tree', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						
						that.zNodes = response.data.data
						that.ztree_obj = $.fn.zTree.init($("#treeDemo"), that.setting, that.zNodes);
						var  nodes = that.ztree_obj.getNodes();
						for  ( var  i = 0; i < nodes.length; i++) {  //设置节点展开
						    that.ztree_obj.expandNode(nodes[i],  true ,  false ,  true );
						}
						that.zNodes_u = response.data.data
						that.ztree_obj_u = $.fn.zTree.init($("#treeDemo4"), that.setting_u, that.zNodes_u);
						that.ztree_obj_u = $.fn.zTree.init($("#treeDemo2"), that.setting_u, that.zNodes_u);
						 var  nodes = that.ztree_obj_u.getNodes();
						for  ( var  i = 0; i < nodes.length; i++) {  //设置节点展开
						    that.ztree_obj_u.expandNode(nodes[i],  true ,  false ,  true );
						}
					})
					.catch(function(error) {
						console.log(error);
						
						that.$Toast('网络拥堵，刷新一下');
					});
			
			},
			
			handleSelect_u2(item,type) {
				if(!item.id){
					this.info.completeId=''
					return 
				}
				this.info.completeName = item.realName
				this.info.completeId = item.id				
				if(type){
					this.showData('check')
				}
			},
			
			querySearch_u(queryString, cb) {
				var that = this
				var name = this.completeName?this.completeName:''
				var id = this.info.departId?this.info.departId:''
				var url = encodeURI(this.$url + '/sys/user/select?realName='+name)
				this.$http.get(url)
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.restaurants_u = response.data.data
						that.restaurants_u.unshift({userName:"账号",realName:"姓名",departName:"科室",phoneNo:"电话"})
						var restaurants_u = that.restaurants_u;
						var results = queryString ? restaurants_u.filter(that.createFilter_u(queryString)) : restaurants_u;
						// 调用 callback 返回建议列表的数据
						if(results.length == 0){
							results.unshift({userName:"暂无内容",realName:"",departName:"",phoneNo:""})
						}else{
							if(results[0].id){
								results.unshift({userName:"账号",realName:"姓名",departName:"科室",phoneNo:"电话"})
							}
						}
						
						cb(results);
						// console.log(that.restaurants)
					})
					.catch(function(error) {
						console.log(error);						
						that.$Toast('网络拥堵，刷新一下');
					});
					
			  
			},
			createFilter_u(queryString) {
				return (restaurant) => {
					// if(restaurant.realName){
						return (restaurant.realName.toLowerCase().indexOf(queryString.toLowerCase()) != -1);
					// }
				};
			},
			handleSelect_u(item) {
				if(!item.id){
					this.info.createName=''
					return 
				}
				this.info.createName = item.realName
				this.info.createId = item.id				
			},
			openadd(id){
				this.showloading = true
				
				var mid = id>0?id:this.mbid
				
				this.user_c = []
				this.cname = []
				this.cname2 = []
				var that = this
				var url = ''
				if(!mid){
					that.info={emergencyId:1}
					that.info.createId = sessionStorage.getItem('uid')
					that.createName = sessionStorage.getItem('realName')
					that.completeName = ''
					that.cnames = ''
					that.cnames2 = ''
					that.files3 = []
					that.files3id = []
					that.showloading = false
					that.showadd=true
					return
				}
				this.$http.get(this.$url + '/rw/template/selectOne?id='+mid)
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						
						that.files3 = []
						that.files3id = []
						that.info = {
							rwName :response.data.data.rwName,
							stageName :response.data.data.stageName,
							rwDescripton :response.data.data.rwDescripton,
							xmId :response.data.data.xmId,
							createId :response.data.data.createId?response.data.data.createId:'',
							completeId :response.data.data.completeId?response.data.data.completeId:'',
							agreeIds :response.data.data.agreeIds?response.data.data.agreeIds.split(','):[],
							notifyIds :response.data.data.notifyIds?response.data.data.notifyIds.split(','):[],
							beginDate :response.data.data.beginDate?new Date(response.data.data.beginDate):'',
							finishDate :response.data.data.finishDate?new Date(response.data.data.finishDate):'',
							score :response.data.data.score?response.data.data.score:'',
							workTime :response.data.data.workTime?response.data.data.workTime:'',
							fileIds :response.data.data.fileIds?response.data.data.fileIds.split(','):[],
							emergencyId: response.data.data.emergencyId?response.data.data.emergencyId:1
						}
						that.changexm(that.info.xmId)
						that.user_c = response.data.data.agreeIds?response.data.data.agreeIds.split(','):[]
						for (var i = 0; i < that.user_c.length; i++) {
							that.user_c[i] = parseInt(that.user_c[i])
						}
						that.cnames = []
						// that.cname = []
						if(response.data.data.agreeUsers){
							for (var i = 0; i < response.data.data.agreeUsers.length; i++) {
								that.cnames.push(response.data.data.agreeUsers[i].realName)
								// that.cname.push(response.data.data.agreeUsers[i].realName)
							}
						}
						that.user_c2 = response.data.data.notifyIds?response.data.data.notifyIds.split(','):[]
						console.log()
						for (var i = 0; i < that.user_c2.length; i++) {
							that.user_c2[i] = parseInt(that.user_c2[i])
						}
						that.cnames2 = []
						// that.cname2 = []
						if(response.data.data.notifyUsers){
							for (var i = 0; i < response.data.data.notifyUsers.length; i++) {
								that.cnames2.push(response.data.data.notifyUsers[i].realName)
								// that.cname2.push(response.data.data.notifyUsers[i].realName)
							}
						}
						that.info.createId = sessionStorage.getItem('uid')
						that.completeName = response.data.data.compleTeName?response.data.data.compleTeName:''
						// that.createName = response.data.data.createName?response.data.data.createName:''
						that.createName = sessionStorage.getItem('realName')
						that.showloading = false
						that.showadd=true
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
				
			},
			
			getinfo(){
				var that = this
				console.log(this.id)
				this.$http.get(this.$url + '/rw/selectOne?id='+this.id)
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						if (response.data.data == null) {
							that.$Toast(response.data.msg);
							return
						}
						
						that.info = {
							id :response.data.data.id,
							rwName :response.data.data.rwName,
							rwDescripton :response.data.data.rwDescripton,
							stageName :response.data.data.stageName,
							xmId :response.data.data.xmId,
							createId :response.data.data.createId,
							completeId :response.data.data.completeId,
							agreeIds :response.data.data.agreeIds?response.data.data.agreeIds.split(','):[],
							notifyIds :response.data.data.notifyIds?response.data.data.notifyIds.split(','):[],
							beginDate :response.data.data.beginDate?new Date(response.data.data.beginDate):'',
							finishDate :response.data.data.finishDate?new Date(response.data.data.finishDate):'',
							createDate :response.data.data.createDate,
							score :response.data.data.score,
							agreeUsers :response.data.data.agreeUsers,
							notifyUsers :response.data.data.notifyUsers,
							workTime :response.data.data.workTime,
							completeName :response.data.data.completeName,
							stateName :response.data.data.stateName,
							fileIds :response.data.data.fileIds?response.data.data.fileIds.split(','):[],
							emergencyId: response.data.data.emergencyId?response.data.data.emergencyId:1
						}
						that.files3 = []
						that.files3id = []
						that.changexm(that.info.xmId)
						for (var i = 0; i < response.data.data.fileList.length; i++) {
							that.files3.push({relativePath:response.data.data.fileList[i].relativePath,name:response.data.data.fileList[i].name})
							that.files3id.push(response.data.data.fileList[i].id)
						}
						that.user_c = response.data.data.agreeIds?response.data.data.agreeIds.split(','):[]
						for (var i = 0; i < that.user_c.length; i++) {
							that.user_c[i] = parseInt(that.user_c[i])
						}
						
						
						if(that.user_c.indexOf(parseInt(sessionStorage.getItem('uid'))) != -1 && response.data.data.stateName == '待审批'){
							that.spshow = true
						}else{
							that.spshow = false
						}
						that.cnames = []
						that.cname = []
						for (var i = 0; i < response.data.data.agreeUsers.length; i++) {
							that.cnames.push(response.data.data.agreeUsers[i].realName)
							that.cname.push(response.data.data.agreeUsers[i].realName)
						}
						that.user_c2 = response.data.data.notifyIds?response.data.data.notifyIds.split(','):[]
						for (var i = 0; i < that.user_c2.length; i++) {
							that.user_c2[i] = parseInt(that.user_c2[i])
						}
						that.cnames2 = []
						that.cname2 = []
						for (var i = 0; i < response.data.data.notifyUsers.length; i++) {
							that.cnames2.push(response.data.data.notifyUsers[i].realName)
							that.cname2.push(response.data.data.notifyUsers[i].realName)
						}
						that.completeName = response.data.data.completeName
						that.createName = response.data.data.createName
						var reg = /^[a-zA-Z]+$/;
						
							if (!reg.test(that.info.completeName)) {
								that.info.pic = that.info.completeName.substring(that.info.completeName
									.length - 2)
							}else{
								that.info.pic = that.info.completeName
							}
							
						// that.getrightlist()
						that.$forceUpdate()
						that.showloading = false
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			
			edit(index){
				this.type = 'edit'
				this.id = this.list[index].id
				this.getinfo()
				
				this.showadd = true
			},
			
			closeadd(){
				this.showadd = false;
				
				this.info =  {}
			},

			 handleSizeChange(val) {
				this.limit = val
				this.choseall = false
				this.getlist()
			},
			handleCurrentChange(val) {
				this.page = val
				this.choseall = false
				this.getlist()
			},
			
			// 表单提交
			showData(type) {				
				this.info.rwName = this.info.rwName?this.info.rwName:''
				this.info.stageName = this.info.stageName?this.info.stageName:''
				this.info.createId = this.info.createId?this.info.createId:''
				this.info.completeId = this.info.completeId?this.info.completeId:''
				this.info.agreeIds = this.user_c.length>0?this.user_c.join(','):''
				this.info.rwDescripton = this.info.rwDescripton?this.info.rwDescripton:''
				this.info.beginDate = this.info.beginDate?this.info.beginDate:''
				this.info.finishDate = this.info.finishDate?this.info.finishDate:''
				if(type=='check2'){
					this.info.stageName=''
					this.changexm(this.info.xmId)
				}else if(type=='check'){
					// if (this.info.stageName.trim() == '') {
					// 	this.$Toast("请填写必填选项");
					// 	return
					// }
				}
				console.log(this.info)
				if (this.info.rwName.trim() == '' || this.info.createId == '' || this.info.completeId == '' ||this.info.agreeIds == ''|| this.info.beginDate == ''|| this.info.finishDate == '') {
					this.$Toast("请填写必填选项");
					return
				}
				if(this.info.createDate){
					delete this.info.createDate
					delete this.info.agreeUsers
					delete this.info.notifyUsers
					delete this.info.completeName
				}
				this.info.beginDate = this.info.beginDate?this.timeFormate(this.info.beginDate):''
				this.info.finishDate = this.info.finishDate?this.timeFormate(this.info.finishDate):''
				this.info.notifyIds = this.user_c2.length>0?this.user_c2.join(','):''
				this.info.fileIds = this.files3id.length>0?this.files3id.join(','):''
				console.log(this.info)
				
				this.showloading = true
				var that = this
				this.$http.post(this.$url + '/rw/save', this.$qs.stringify(this.info))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.$Toast(response.data.msg);
						that.showadd = false
						that.showloading = false
						that.check = 0
						that.user_c = []
						that.user_c2 = []
						that.cname = []
						that.cname2 = []
						that.cnames = ""
						that.cname2s = ""
						// if(type=='check'){
						// 	that.getinfo()
						// 	that.pager = 1
						// 	that.rightlist = []
						// 	that.getrightlist()
						// }
						console.log(type)
						 
						that.getlist()
						that.$forceUpdate()
					})
					.catch(function(error) {
						that.$Toast('网络拥堵，刷新一下');
					});
				
			},
			
			// 点击遮罩层
			close(){
				this.options_show=false
				this.options_show2=false
				this.showzzc=false
				this.showinfo=false
				this.menushow=false
			},
			
			//显示当前时间（年月日时分秒）
			timeFormate(timeStamp) {
			      let year = new Date(timeStamp).getFullYear();
			      let month =new Date(timeStamp).getMonth() + 1 < 10? "0" + (new Date(timeStamp).getMonth() + 1): new Date(timeStamp).getMonth() + 1;
			      let date =new Date(timeStamp).getDate() < 10? "0" + new Date(timeStamp).getDate(): new Date(timeStamp).getDate();
				  let hh =new Date(timeStamp).getHours() < 10? "0" + new Date(timeStamp).getHours(): new Date(timeStamp).getHours();
				  let mm =new Date(timeStamp).getMinutes() < 10? "0" + new Date(timeStamp).getMinutes(): new Date(timeStamp).getMinutes();
				  let ss =new Date(timeStamp).getSeconds() < 10? "0" + new Date(timeStamp).getSeconds(): new Date(timeStamp).getSeconds();
				  
			    return year + "-" + month + "-" + date +" "+hh+":"+mm+':'+ss  ;
			},
			getlist() {
				this.showloading = true
				var param ={
						page: this.page,
						limit: this.limit,
						createId:this.createIds,
						agreeIds:this.agreeIdss,
						completeId:this.completeIds,
						xmId:this.value4s,
						beginDate:this.byDates?this.timeFormate(this.byDates):'',
						finishDate:this.byDate2s?this.timeFormate(this.byDate2s):"",
						stateId:this.value2s,
					}
				if(this.typelist == 'toMe'){
					param.toMe = sessionStorage.getItem('uid')
				}else if(this.typelist == 'outOfTime'){
					param.outOfTime = sessionStorage.getItem('uid')
				}else if(this.typelist == 'myTake'){
					param.myTake = sessionStorage.getItem('uid')
				}else if(this.typelist == 'finished'){
					param.finished = sessionStorage.getItem('uid')
				}else if(this.typelist == 'myArr'){
					param.myArr = sessionStorage.getItem('uid')
				}else if(this.typelist == 'attention'){
					param.attention = sessionStorage.getItem('uid')
				}else if(this.typelist == 'failRw'){
					param.failRw = sessionStorage.getItem('uid')
				}
				
				var that = this
				this.$http.post(this.$url + '/rw/select', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.list = response.data.data
						that.inglen = response.data.count
						for (var i = 0; i < that.list.length; i++) {
							that.list[i].chosesf = false
						}
						that.choseall = false
						that.showloading = false
					})
					.catch(function(error) {
						console.log(error);
						// sessionStorage.setItem('token','undefined')
						// that.$router.push('/login')
						
						that.$Toast('网络拥堵，刷新一下');
					});

			},
		},

		computed: {},
	}
</script>
<style lang='less' scoped>
	.subli .radio label {
		min-height: 34px;
		display: flex;
		align-items: center;
	}

	.task_li .radio div {
		margin-right: 0;
	}

	.el-radio {
		margin-right: 20px;
	}

	.alert_btns {
		margin-top: 16px;
	}

	.radio label {
		padding-left: 0;
	}

	.foucs {
		width: 18px;
		height: 18px;
		margin-bottom: 3px;
		margin-left: 15px;
		cursor: pointer;
	}

	.enr_alert_scorll td {
		word-break: break-all;
		max-width: 60px;
	}

	.enr_alert_scorll {
		padding-bottom: 0;
	}

	.upd {
		width: 60px;
	}

	.msgbox {
		display: flex;
		justify-content: space-between;
	}

	.msgbox_left {
		display: flex;
		align-items: center;
	}

	.sendbtn {
		width: 57px;
		height: 34px;
		background: #32B16C;
		border-radius: 6px;
		font-size: 14px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-left: -3px;
		cursor: pointer;
	}

	.sendinp {
		width: 264px;
		height: 34px;
		background: #FFFFFF;
		border: 1px solid #CCCCCC;
		border-right: none;
		box-shadow: 0px 2px 0px 0px #EEEEEE;
		border-radius: 5px 0 0 5px;
		padding-left: 10px;
		outline: none;
	}

	.rightbix {
		overflow-y: auto;
		height: calc(100vh - 280px);
		margin-bottom: 23px;
	}

	.sanj2 {
		width: 0;
		height: 0;
		border-right: 9px solid #F1F4FD;
		border-top: 12px solid transparent;
		border-bottom: 12px solid transparent;
		margin-top: 9px;
	}

	.sanj {
		width: 0;
		height: 0;
		border-left: 9px solid #F1F4FD;
		border-top: 12px solid transparent;
		border-bottom: 12px solid transparent;
		margin-top: 9px;
	}

	.r_bto {
		display: flex;
		justify-content: end;

	}

	.rightli {
		display: flex;
		align-items: flex-end;
		flex-direction: column;
		margin-bottom: 19px;
	}

	.leftli {
		display: flex;
		align-items: flex-start;
		flex-direction: column;
		margin-bottom: 19px;
	}

	.rbto {
		width: 286px;
		/* height: 77px; */
		background: #F1F4FD;
		border-radius: 6px;
		padding: 14px;
		font-size: 12px;
		color: #000000;

		line-height: 18px;
		word-break: break-all;
	}

	.rt {
		color: #999999;
		font-size: 12px;
	}

	.rtl {
		display: flex;
	}

	.rname {
		font-size: 12px;
		color: #000000;
		margin-right: 10px;
	}

	.leftli .r_top {
		margin-right: 0;
		margin-left: 55px;
	}

	.r_top {
		display: flex;
		justify-content: space-between;
		width: 286px;
		margin-right: 60px;
	}

	.task_r .iconfont {
		font-size: 24px;
		position: absolute;
		top: 0;
		right: 5px;
		line-height: 34px;
		cursor: pointer;

	}

	.task_r {
		line-height: 34px;
		position: relative;
	}

	.alert_info {
		margin-top: 20px;
	}

	.alert_info textarea {
		width: 100%;
		background: #FFFFFF;
		border: 1px solid #CCCCCC;
		box-shadow: 0px 2px 0px 0px #EEEEEE;
		border-radius: 5px;
		padding: 5px 10px;
		outline: none;
		margin-top: 10px;
		margin-bottom: -10px;
	}

	.task_li {
		display: flex;
		/* align-items: center; */
		margin-bottom: 20px;

	}

	.task_r textarea {
		width: 271px;
		height: 129px;
		background: #FFFFFF;
		border: 1px solid #CCCCCC;
		box-shadow: 0px 2px 0px 0px #EEEEEE;
		border-radius: 5px;
		padding: 5px 10px;
		outline: none;
	}

	.task_l {
		font-size: 14px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #000000;
		line-height: 34px;
	}

	.flexbox img {
		width: 18px;
		margin-left: 6px;
	}

	.flexbox {
		display: flex;
		align-items: center;
	}

	.rwname {
		font-size: 18px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #4286F5;
		width: 228px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.task_sp_bto {
		display: flex;
		justify-content: center;
		align-items: center;
		height: 67px;
	}

	.task_pass {
		width: 76px;
		height: 34px;
		background: #32B16C;
		border-radius: 6px;
		font-size: 14px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #FFFFFF;
		text-align: center;
		line-height: 34px;
		margin-left: 19px;
		cursor: pointer;
	}

	.task_th {
		width: 76px;
		height: 34px;
		background: #EC6941;
		border-radius: 6px;
		font-size: 14px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #FFFFFF;
		text-align: center;
		line-height: 34px;
		cursor: pointer;
	}

	.task_sp_no {
		font-size: 16px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #4286F5;
	}

	.task_sp_top {
		border-bottom: 1px solid #dce6fc;
		height: 80px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.task_sp_name {
		width: 55px;
		height: 55px;
		background: #4286F5;
		border-radius: 100%;
		font-size: 14px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #FFFFFF;
		margin-right: 13px;
		display: block;
		text-align: center;
		line-height: 55px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.task_sp {
		width: 357px;
		height: 148px;
		background: #F1F4FD;
		border-radius: 6px;
		padding: 0 14px;
		margin-bottom: 30px;
	}

	.task_left {
		width: 50%;
		height: calc(100vh - 103px);
		overflow-y: scroll;
		padding: 35px 32px;
		overflow-x: hidden;
	}

	.task_box_title {
		display: flex;
		align-items: center;
		font-size: 20px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		margin-bottom: 10px;
		color: #000000;
	}

	.task_box {
		display: flex;
		align-items: stretch;
	}

	.task_cur {
		width: 9px;
		height: 9px;
		background: #D2D2D2;
		border-radius: 50%;
		margin-right: 10px;
	}

	.ri_li {
		display: flex;
		align-items: center;
		padding: 11px 20px;
		cursor: pointer;
	}

	.ri_li img {
		margin-right: 8px;
	}

	.rightmenu {
		position: absolute;
		width: 130px;
		/* height: 119px; */
		background: #FFFFFF;
		/* border: 1px solid #D2D2D2; */
		box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.1);
		right: 0;
		padding-top: 7px;
	}

	.taskinfo_box {
		/* width: 865px; */
		animation: test .3s;
		width: 0;
		height: calc(100vh - 50px);
		background: #fff;
		box-shadow: 0px 10px 10px 0px rgba(0, 0, 0, 0.2);

	}

	@keyframes test2 {
		0% {
			width: 846px;
		}

		100% {
			width: 0;
		}
	}

	@keyframes test {
		0% {
			width: 0;
		}

		100% {
			width: 846px;
		}
	}

	.tx {
		animation: test .3s;
		width: 865px;
	}

	.tx2 {
		animation: test2 .3s;
		width: 0;
	}

	.task_info_title_right {
		position: relative;
	}

	.task_info_title_right img {
		width: 18px;
	}

	.task_left_a {
		display: flex;

	}

	.task_info_title_left {
		width: 100px;
		height: 34px;
		background: #3574DA;
		border-radius: 17px;
		font-size: 14px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		margin-right: 30px;
	}

	.task_info_title_fail {
		width: 100px;
		height: 34px;
		background: #ccc;
		border-radius: 17px;
		font-size: 14px;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
	}

	.task_zzc {
		width: 846px;
		height: 100vh;
		display: flex;
		align-items: center;
		justify-content: flex-end;
		position: fixed;
		padding-top: 50px;
		top: 0;
		/* left: 0; */
		right: 0;
		z-index: 5;
	}

	.taskinfo_title {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 20px;
		background: #f7f7f7;
		height: 53px;
	}

	.rwadd {
		height: 20px;
		line-height: 20px;
		padding-right: 8px;
		border-right: 1px solid #fff;
		margin-right: 13px;
	}

	.rw {
		width: 120px;
		margin-bottom: 20px;
		background-color: #409eff;
		border-radius: 34px;
	}

	.btnsele {
		border: none;
		margin-bottom: 0 !important;

		margin-left: 0 !important;
	}

	.rw .btnsele /deep/ .el-input .el-select__caret {
		color: #fff;
		position: relative;
		left: 10px;
	}

	.rw .btnsele /deep/ .el-input__inner {
		width: 10px;
		border: none;
		padding: 0;
		background: transparent;
		color: transparent;
		/* height: 0; */
	}

	/* 
	.rw img {
		height: 13px;
		width: 13px;
		margin-right: 3px;
	} */

	.input-cont:hover .clears {
		display: block;
	}

	.clears {
		width: 10px;
		position: absolute;
		right: 35px;
		top: 14px;
		display: none;
		cursor: pointer;
	}

	.sublia {
		display: flex;

	}

	.subli textarea {
		width: 673px;
		height: 70px;
		background: #FFFFFF;
		border: 1px solid #CCCCCC;
		box-shadow: 0px 2px 0px 0px #EEEEEE;
		border-radius: 5px;
		outline: none;
		padding: 10px 10px;
	}

	.subli /deep/ .el-date-editor--date .el-input__inner,
	.subli /deep/ .el-date-editor.el-input,
	.el-date-editor.el-input__inner {
		width: 271px !important;
	}

	.subl {
		width: 100px;
		text-align: right;
		margin-right: 17px;
	}

	.subli /deep/ .el-input__prefix,
	.task_r /deep/ .el-input__prefix {
		right: 5px;
		left: auto;
		width: 25px;
	}

	.subli input,
	.subli .el-select {
		width: 271px;
		margin-left: 0;
	}

	.subli /deep/ .el-input__inner {
		height: 34px;
	}

	.subli label {
		margin-bottom: 0;
	}

	.sublist {
		padding-top: 15px;
	}

	.subli_left {
		display: flex;
		align-items: center;
		width: 50%;
	}

	.subli {
		display: flex;
		align-items: center;
		color: #000;
		margin-bottom: 15px;
		justify-content: space-between;
	}

	/deep/ .el-pagination .btn-prev {
		border: 1px solid #ccc;
		padding: 0;
		border-right: none;
		min-width: 33px;
		height: 33px;
		padding-top: 2px;
	}

	/deep/ .el-pagination .btn-next {
		border: 1px solid #ccc;
		padding: 0;
		border-left: none;
		min-width: 33px;
		height: 33px;
		padding-top: 2px;
	}

	/deep/ .el-pager li {
		border: 1px solid #ccc;
		padding: 0;
		border-right: none;
		min-width: 33px;
		height: 33px;
		line-height: 33px;
	}

	/deep/ .el-pager li:nth-last-of-type(1) {
		border-right: 1px solid #ccc;
	}

	/deep/ .el-pager li.active {
		border: #4286f5 1px solid;
		background: #4286f5;
		color: #fff;
	}

	.numslen {
		position: absolute;
		bottom: 0px;
		right: 50px;
		font-size: 12px;
	}

	/deep/ .el-input--prefix .el-input__inner {
		height: 34px;
		padding: 0 8px;
	}

	/deep/ .el-date-editor--date .el-input__inner {
		width: 150px !important;
	}

	.search_box /deep/ .el-input__inner {
		width: 117px;
		height: 34px;
		/* background: #F6F6F6; */
		border: 1px solid #CCCCCC;
		/* box-shadow: 0px 2px 0px 0px #EEEEEE; */
		border-radius: 5px;
	}

	/deep/ .el-input__icon {
		line-height: 34px;
	}


	.el-select {
		margin-left: 10px;
	}

	.search_box .el-select {
		margin-bottom: 20px;
	}

	.form-group .el-select {
		margin-left: 0px
	}

	.el-input__icon {
		line-height: 34px;
	}

	.el-input__inner {
		height: 34px;
		width: 110px;
		/* margin-left: 10px; */
	}

	.el-upload__input {
		bottom: 35px;
	}


	.btns {
		min-width: 72px;
		padding: 0 8px !important;
		width: auto !important;
	}


	.options {
		z-index: 40001;
	}



	.down_li:hover {
		background: #4286f5;
		color: #fff;
	}


	.modal-lg .modal-body.h100 {
		height: calc(100vh - 130px);
	}

	.el-input--prefix .el-input__inner {
		padding-left: 12px;
		padding-right: 12px;
	}

	.search_inp {
		width: 260px;
		/* width: 160px; */
		margin-left: 10px;
		margin-bottom: 20px;
	}

	.mb0,
	.mb0 .form-group {
		margin-bottom: 15px;
	}


	.btn-primary:hover {
		color: #fff !important;
		background: #4286f5 !important;
		border: none;
	}

	.btn-primary {
		outline: none !important;
		color: #fff !important;
		background: #4286f5 !important;
		margin-right: 18px;
	}

	.close_eng:hover {
		color: #434343 !important;
		background: #EEEEEE !important;
		border: none;
	}

	.close_eng {
		border: none;
		color: #434343 !important;
		background: #EEEEEE !important;
		outline: none !important;
	}

	.el-autocomplete {
		width: 271px;
	}

	.el-autocomplete-suggestion li.highlighted,
	.el-autocomplete-suggestion li:hover {
		background-color: #ddd;
	}

	.el-popper {
		margin-top: 0;
		margin-right: 0;
	}

	/* 	.el-scrollbar__wrap > .rws {
		margin-left: -34px;
		margin-right: 0;
	} */

	.my-autocomplete {
		border-radius: 0 0 6px 6px;
		min-width: 400px;
		margin-top: 0 !important;


		.popper__arrow {
			display: none;
		}

		.el-scrollbar__wrap {
			padding: 0 !important;
			overflow-x: scroll;

			li {
				padding: 0 !important;
				min-width: 320px;
			}

		}

	}

	.tab_td {
		width: 25%;
		min-width: 80px;
		display: inline-block;
		padding: 0 10px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.el-scrollbar__wrap {
		-ms-overflow-style: none !important;
	}

	.el-scrollbar__wrap::-webkit-scrollbar {
		display: none;
	}

	.el-scrollbar__wrap li:nth-of-type(1) .tab_tr {
		border-top: 1px solid #ddd;
		background-color: #ddd;
	}

	.tab_tr {
		height: 40px;
		border-bottom: 1px solid #ddd;
		line-height: 40px;
		/* display: flex; */
	}

	.text_org {
		color: #EB6100;
	}

	.container /deep/ tr td:nth-of-type(2) span {
		color: #22ac38;
	}

	.el-pagination__total {
		height: 33px !important;
		line-height: 33px !important;
	}

	.el-input--mini .el-input__inner {
		height: 33px;
	}

	.el-pagination__editor.el-input .el-input__inner {
		height: 33px;
	}

	.page_box {
		display: flex;
		justify-content: flex-end;
		margin-top: 30px;
	}

	.el-pagination .btn-prev {
		border: 1px solid #ccc;
		padding: 0;
		border-right: none;
		min-width: 33px;
		height: 33px;
		padding-top: 2px;
	}

	.el-pagination .btn-next {
		border: 1px solid #ccc;
		padding: 0;
		border-left: none;
		min-width: 33px;
		height: 33px;
		padding-top: 2px;
	}

	.el-pager li {
		border: 1px solid #ccc;
		padding: 0;
		border-right: none;
		min-width: 33px;
		height: 33px;
		line-height: 33px;
	}

	.el-pager li:nth-last-of-type(1) {
		border-right: 1px solid #ccc;
	}

	.el-pager li.active {
		border: #4286f5 1px solid;
		background: #4286f5;
		color: #fff;
	}

	.btns {
		width: 72px;
		padding: 0;
	}

	.zzc {
		width: 100vw;
		height: 100vh;
		position: fixed;
		top: 0;
		left: 0;
	}


	.ger:hover {
		background: #22ac38;
		color: #fff;
	}

	.loading-content {
		position: absolute;
		z-index: 2000;
		/* background-color: rgba(0, 0, 0, 0.8); */
		margin: 0;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		transition: opacity 0.3s;
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		/* width: 200px;
		height: 150px;
		border-radius: 10px; */
	}

	.loading-spinner {
		text-align: center;
	}

	.loading-spinner .circular {
		height: 42px;
		animation: loading-rotate 2s linear infinite;
	}

	.loading-spinner .path {
		animation: loading-dash 1.5s ease-in-out infinite;
		stroke-dasharray: 90, 150;
		stroke-dashoffset: 0;
		/* stroke- 2; */
		stroke: #000;
		stroke-linecap: round;
	}

	.loading-text {
		font-size: 14px;
		color: #000;
	}

	@keyframes loading-rotate {
		100% {
			transform: rotate(360deg);
		}
	}

	@keyframes loading-dash {
		0% {
			stroke-dasharray: 1, 200;
			stroke-dashoffset: 0;
		}

		50% {
			stroke-dasharray: 90, 150;
			stroke-dashoffset: -40px;
		}

		to {
			stroke-dasharray: 90, 150;
			stroke-dashoffset: -120px;
		}
	}


	.qx:hover {
		/* background: #edf3fd; */
		/* color: #4286f5; */
	}

	/* 	.nosingle:hover {
		background: #d28679;
		color: #fff;
	} */

	.nosingle {
		/* background: #fcf4f2;  */
		color: #d28679;
	}

	/* .waitdoing:hover {
		background: #db9d46;
		color: #fff;
	}
 */
	.waitdoing {
		/* background: #fef6eb; */
		color: #db9d46;
	}

	/* .wait:hover {
		background: #af7087;
		color: #fff;
	} */

	.wait {

		/* background: #fbeff4; */
		color: #af7087;
	}



	.btns .iconfont {
		font-size: 10px;
		transition: all .3s;
		transform: rotateZ(0deg);
		line-height: 26px;
	}



	td,
	th {
		font-size: 14px;
		color: #333;
		/* line-height: 22px; */
		padding: 10px;
		border-top: 0;
		border-bottom: 1px solid #eee;
	}



	.modal {
		position: absolute;
	}

	.modal-dialog {
		height: 97%;
	}

	.modal-header {
		position: sticky;
		top: 0;
		z-index: 50;
	}

	.modal-content {
		/* width: 85%; */
		margin: 0 auto;
		max-height: 100%;
		/* height: 65vh; */
		/* overflow-y: scroll; */
	}

	.cent {
		width: 100%;
		align-items: center;
	}
</style>
